package com.effective.java.clone.main.people;

import com.effective.java.clone.bean.Agent;
import com.effective.java.clone.bean.Color;
import com.effective.java.clone.bean.People;

/**
 * Author: Eric
 * 7/20/2022 8:34 PM
 */
public class Main {
    public static void main(String[] args) {
        People jack = new People("Jack", Agent.MAN, (short) 175, new Color("YELLOW"));
        try {
            People clone = jack.clone();

            System.out.println(clone == jack);
            System.out.println(clone.getColor() == jack.getColor());

        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

    }
}
